<template>
	<!--  在售商品-->
	<view class="infoall" @click="getGoodInfo(details.productId,details.type)">
		<view class="infocard">
			<u-image :src="details.coverImg" :lazy-load="true" shape="square" mode="aspectFill" width="27vw"
				height="15vh"></u-image>
			<view class="proInfo">
				<view class="box">
					<view class="name">{{details.varieties}}</view>
					<view class="price">{{details.price}}元/斤</view>
				</view>
				<view class="box">
					<view>品种：{{details.species}}</view>
				</view>
				<view class="box1">总重：{{details.weight}}Kg</view>
				<view class="area">产地：{{details.area}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		mounted() {
			this.details
		},
		props: ['details'],
		methods: {
			getGoodInfo(id, type) {
				this.pushNewPage("product", {
					id,
					type
				})
			}
		},
	}
</script>

<style>
	.infoall {
		background-color: #ffffff;
		position: relative;
	}

	.infocard {
		margin-top: 10px;
		display: flex;
		width: 98vw;
		height: auto;
	}

	.proInfo {
		width: 60vw;
		margin-left: 3vw;
	}

	.box {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.area {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.price {
		margin-left: 20vw;
		white-space: nowrap;
		color: rgba(255, 87, 51, 1);
		font-size: 28rpx;
	}

	.name {
		font-weight: bolder;
		font-size: 1.25rem;
	}
</style>
